//
//  WJIndexTwoOfThiedCell.m
//  天气
//
//  Created by dllo on 16/8/24.
//  Copyright © 2016年 WJ. All rights reserved.
//

#import "WJIndexTwoOfThiedCell.h"
#import "WJImageView.h"
#define kWJWidth  [UIScreen mainScreen].bounds.size.width
#define kWJHeight [UIScreen mainScreen].bounds.size.height

@interface WJIndexTwoOfThiedCell ()

@property (nonatomic, strong) UILabel *weatherLable;
@property (nonatomic, strong) WJImageView *weatherPic;


@end

@implementation WJIndexTwoOfThiedCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createView];
    }
    return self;
}


- (void)createView
{
    self.weatherPic = [[WJImageView alloc]initWithFrame:CGRectMake(kWJWidth / 14 - 15, 0, 30, 30)];
    [self.contentView addSubview:self.weatherPic];
    
    self.weatherLable = [[UILabel alloc]initWithFrame:CGRectMake(0, 50, kWJWidth / 7 , 20)];
    self.weatherLable.textAlignment = 1;
    self.weatherLable.font = [UIFont systemFontOfSize:13];
    self.weatherLable.textColor = [UIColor whiteColor];
    [self.contentView addSubview:self.weatherLable];
    
}

- (void)setDic:(NSDictionary *)dic
{
    _dic = dic;
    
    self.weatherLable.text = [NSString stringWithFormat:@"%@",dic[@"info"][@"night"][1]];
    
    self.weatherPic.image = [WJImageView imageWithNightName:dic[@"info"][@"night"][1]];
}





@end
